import React, { memo } from "react"
import { Card } from "antd"
import SvgIcon from "@/components/SvgIcon"
import { ReactComponent as WelcomeSvg } from "@/assets/icons/svg/welcome.svg" // 你的 '*.svg' 文件路径
import { useAppSelector } from "@/store"
import { shallowEqual } from "react-redux"
import { getTimeRegion } from "@/utils"
import "./index.less"
const Home: React.FC = () => {
	const { userInfo } = useAppSelector(
		(state) => ({
			userInfo: state.userStore.userInfo,
		}),
		shallowEqual,
	)
	return (
		<>
			<Card>
				<div className="container">
					<img src={userInfo?.avatar} alt="" />
					<div className="context">
						<h1>
							{getTimeRegion()}好呀！！{userInfo?.name}
						</h1>
						<p>后台管理系统！！！</p>
					</div>
				</div>
			</Card>
			<div className="svg">
				<SvgIcon svgComponet={WelcomeSvg} size="500px" />
			</div>
		</>
	)
}
export default memo(Home)
